package com.machineapps.botesom2.repository;

import java.util.List;

import com.machineapps.botesom2.model.Button;
import com.machineapps.botesom2.model.Category;
import com.machineapps.framework.repository.Repository;

public interface CategoryRepository extends Repository<Category> {

	/**
	 * Return the buttons assigned to a category.
	 * 
	 * @param categoryId The desired category.
	 * @return The buttons assigned to the passed category
	 */
	public List<Button> getButtonsFromCategory(long categoryId);

	/**
	 * Adds a button to a category
	 * 
	 * @param buttonId The desired button.
	 * @param categoryId The desired category.
	 */
	public void addButtonToCategory(long buttonId, long categoryId);
	
	/**
	 * Remove button from category.
	 * 
	 * @param buttonId The desired button.
	 * @param categoryId The desired category.
	 */
	public void removeButtonFromCategory(long buttonId, long categoryId);
	
	public boolean existsButtonInCategory(long buttonId, long categoryId);
	
	public void createCategory(Category category);
}